package com.example.tests;

public class ContactData implements Comparable<ContactData> {
	
	private String id;
	private String fname;
	private String lname;
	private String primaddress;
	private String primhomephone;
	private String mobphone;
	private String workphone;
	private String emailprim;
	private String emailsec;
	private String birthday;
	private String birthmonth;
	private String birthyear;
	private String secaddress;
	private String sechomephone;

	public ContactData() {
	}

	@Override
	public String toString() {
		return "ContactData [lastname=" + lname + "]";
	}

	@Override
	public int hashCode() {
		int result = 1;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ContactData other = (ContactData) obj;
		if (lname == null) {
			if (other.lname != null)
				return false;
		} else if (!lname.equals(other.lname))
			return false;
		return true;
	}

	@Override
	public int compareTo(ContactData other) {
		return this.lname.toLowerCase().compareTo(other.lname.toLowerCase());
	}

	public ContactData withFname(String fname) {
		this.fname = fname;
		return this;
	}

	public ContactData withLname(String lname) {
		this.lname = lname;
		return this;
	}

	public ContactData withPrimaddress(String primaddress) {
		this.primaddress = primaddress;
		return this;
	}

	public ContactData withPrimhomephone(String primhomephone) {
		this.primhomephone = primhomephone;
		return this;
	}

	public ContactData withMobphone(String mobphone) {
		this.mobphone = mobphone;
		return this;
	}

	public ContactData withWorkphone(String workphone) {
		this.workphone = workphone;
		return this;
	}

	public ContactData withEmailprim(String emailprim) {
		this.emailprim = emailprim;
		return this;
	}

	public ContactData withEmailsec(String emailsec) {
		this.emailsec = emailsec;
		return this;
	}

	public ContactData withBirthday(String birthday) {
		this.birthday = birthday;
		return this;
	}

	public ContactData withBirthmonth(String birthmonth) {
		this.birthmonth = birthmonth;
		return this;
	}

	public ContactData withBirthyear(String birthyear) {
		this.birthyear = birthyear;
		return this;
	}

	public ContactData withSecaddress(String secaddress) {
		this.secaddress = secaddress;
		return this;
	}

	public ContactData withSechomephone(String sechomephone) {
		this.sechomephone = sechomephone;
		return this;
	}

	public String getId() {
		return id;
	}

	public String getFname() {
		return fname;
	}

	public String getLname() {
		return lname;
	}

	public String getPrimaddress() {
		return primaddress;
	}

	public String getPrimhomephone() {
		return primhomephone;
	}

	public String getMobphone() {
		return mobphone;
	}

	public String getWorkphone() {
		return workphone;
	}

	public String getEmailprim() {
		return emailprim;
	}

	public String getEmailsec() {
		return emailsec;
	}

	public String getBirthday() {
		return birthday;
	}

	public String getBirthmonth() {
		return birthmonth;
	}

	public String getBirthyear() {
		return birthyear;
	}

	public String getSecaddress() {
		return secaddress;
	}

	public String getSechomephone() {
		return sechomephone;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setFname(String fname) {
		this.fname = fname;
	}

	public void setLname(String lname) {
		this.lname = lname;
	}

	public void setPrimaddress(String primaddress) {
		this.primaddress = primaddress;
	}

	public void setPrimhomephone(String primhomephone) {
		this.primhomephone = primhomephone;
	}

	public void setMobphone(String mobphone) {
		this.mobphone = mobphone;
	}

	public void setWorkphone(String workphone) {
		this.workphone = workphone;
	}

	public void setEmailprim(String emailprim) {
		this.emailprim = emailprim;
	}

	public void setEmailsec(String emailsec) {
		this.emailsec = emailsec;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	public void setBirthmonth(String birthmonth) {
		this.birthmonth = birthmonth;
	}

	public void setBirthyear(String birthyear) {
		this.birthyear = birthyear;
	}

	public void setSecaddress(String secaddress) {
		this.secaddress = secaddress;
	}

	public void setSechomephone(String sechomephone) {
		this.sechomephone = sechomephone;
	}
}